package com.ktgj.customer.service;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import com.ktgj.customer.domain.DepositBusiness;
import com.ktgj.customer.domain.vo.DepositBusinessVo;
import com.ktgj.customer.domain.vo.DepositInfo;
import com.ktgj.customer.domain.vo.GoldListVo;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

/**
 * 预留款业务
Service接口
 * 
 * @author ruoyi
 * @date 2021-07-27
 */
public interface IDepositBusinessService
{
    /**
     * 查询预留款业务
     *
     * @param businessId 预留款业务
     *                   ID
     * @return 预留款业务
     */
    public DepositBusiness selectDepositBusinessById(Long businessId);

    /**
     * 查询预留款业务
     * 列表
     *
     * @param depositBusiness 预留款业务
     * @return 预留款业务
     * 集合
     */
    public List<DepositBusiness> selectDepositBusinessList(DepositBusiness depositBusiness);

    /**
     * 新增预留款业务
     *
     * @param depositBusiness 预留款业务
     * @return 结果
     */
    public Long insertDepositBusiness(DepositBusiness depositBusiness);

    /**
     * 修改预留款业务
     *
     * @param depositBusiness 预留款业务
     * @return 结果
     */
    public int updateDepositBusiness(DepositBusiness depositBusiness);

    /**
     * 批量删除预留款业务
     *
     * @param businessIds 需要删除的预留款业务
     *                    ID
     * @return 结果
     */
    public int deleteDepositBusinessByIds(Long[] businessIds);

    /**
     * 删除预留款业务
     * 信息
     *
     * @param businessId 预留款业务
     *                   ID
     * @return 结果
     */
    public int deleteDepositBusinessById(Long businessId);

    /**
     * 查看用户可用预留款
     *
     * @param customerId
     * @return
     */
    public BigDecimal queyUserDepositBusiness(Long customerId);

    /**
     * 我的资产
     */
    public DepositBusinessVo selectDepositBusinessByCustomerId(Long customerId, String operationtime);

    /**
     * 预留款审核
     */
    public boolean goldCoinAudit(Long employeeId, Long id, String remark) throws Exception;

    /**
     * 预留款统计
     */
    public BigDecimal goldStatistics(Long id) throws Exception;

    /**
     * 预留款列表
     */
    public List<DepositBusiness> goldList(GoldListVo goldListVo);

    public boolean depositAudit(Long id, String remark);

    /**
     * 预留款调整
     */
    public int goldAdjustment(HttpServletRequest request, DepositBusiness depositBusiness) throws Exception;

    /**
     * 当前会员可支配预留款
     */
    public BigDecimal dominateGold(Long id);

    /**
     * 订单号查预留款记录
     */
    public boolean audit(String orderNum);

    //花费预留款
    boolean spendDeposit(DepositInfo depositInfo);
}
